package com.genius.system.bo;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.validation.constraints.*;

@Data
@ApiModel(value = "修改机构BO", description = "从客户端，由用户传入的数据封装在此entity中")
public class UpdateDeptBO {

    @NotNull(message = "机构ID不能为空")
    @ApiModelProperty(value = "机构ID")
    private Long deptId;

    @ApiModelProperty("父机构ID")
    private Long parentId;

    @NotBlank(message = "机构名称不能为空")
    @ApiModelProperty("机构名称")
    private String deptName;

    @NotNull(message = "显示顺序不能为空")
    @Min(value = 0, message = "显示顺序不能小于0")
    @ApiModelProperty("显示顺序")
    private Integer orderNum;

    @ApiModelProperty("负责人")
    private String leader;

    @NotBlank(message = "手机号不能为空")
    @Pattern(regexp = "^1\\d{10}$", message = "手机号不正确")
    @ApiModelProperty("手机号")
    private String phone;

    @NotBlank(message = "邮箱不能为空")
    @Email(message = "邮箱不正确")
    @ApiModelProperty("邮箱")
    private String email;

    @NotNull(message = "机构状态不能为空")
    @ApiModelProperty("机构状态（1正常 0停用）")
    private String status;

    @ApiModelProperty("备注")
    private String remark;
}
